self.info['image'],
self.info['device'])
- if self.info['bootloader']:
- self.image.handleBootloading()
-
xc.domain_setcpuweight(self.domid, self.info['cpu_weight'])
m = self.image.getDomainMemory(self.info['memory'] * 1024)
self.createDevices()
+ if self.info['bootloader']:
+ self.image.cleanupBootloading()
+
self.info['start_time'] = time.time()
False if it is to be destroyed.
"""
+ self.configure_bootloader()
config = self.sxpr()
if self.readVm(RESTART_IN_PROGRESS):
# FIXME: this assumes the disk is the first device and
# that we're booting from the first disk
blcfg = None
+ config = self.sxpr()
# FIXME: this assumes that we want to use the first disk
- dev = sxp.child_value(self.config, "device")
+ dev = sxp.child_value(config, "device")
if dev:
disk = sxp.child_value(dev, "uname")
fn = blkdev_uname_to_file(disk)
msg = "Had a bootloader specified, but can't find disk"
log.error(msg)
raise VmError(msg)
- self.config = sxp.merge(['vm', ['image', blcfg]], self.config)
+ self.info['image'] = sxp.to_string(blcfg)
def send_sysrq(self, key):
file = blkif.blkdev_uname_to_file(uname)
return bootloader(vals.bootloader, file, not vals.console_autoconnect,
- vals.vcpus, vals.blentry)
+ vals.vcpus, vals.bootentry)
def make_config(vals):
"""Create the domain configuration.
vals.extra = vnc + ' ' + vals.extra
def preprocess(vals):
- if not vals.kernel:
+ if not vals.kernel and not vals.bootloader:
err("No kernel specified")
preprocess_disk(vals)
preprocess_pci(vals)